<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="Info.RoomInfo"%>
<%@page import="java.util.List"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看某类房间</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div id="wrap">
		<div id="top_content">
			<div id="header">
				<div id="rightheader">
					<p>
						<%
							Date d = new Date();
							SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
						%>
						<%=sdf.format(d)%>
						<br />
					</p>
				</div>
				<div id="topheader">
					<h1 id="title">
					<a href="#">预定房间管理</a></h1>
				</div>
			</div>
			<div id="content">
				<p id="whereami"></p>
				<h1>Welcome!</h1>
				<table class="table" width="1000" border="1" cellpadding="0"
					cellspacing="0">
					<tr class="table_header">
						<td width="4%" align="center">ID</td>
						<td width="8%" align="center">房间编号</td>
						<td width="8%" align="center">房间面积</td>
						<td width="4%" align="center">床数</td>
						<td width="8%" align="center">房间单价</td>
						<td width="8%" align="center">房间类型</td>
						<td width="8%" align="center">房间级别</td>
						<td width="4%" align="center">卫生间</td>
						<td width="4%" align="center">空调</td>
						<td width="4%" align="center">电视</td>
						<td width="4%" align="center">电话</td>
						<td width="8%" align="center">房间状态</td>
						<td width="5%" align="center">备注</td>
						<td width="14%" align="center">操作按钮</td>
					</tr>
					<%
						List<RoomInfo> list = (List<RoomInfo>) request.getAttribute("rooms");
						for (int i = 0; i < list.size(); i++) {
							RoomInfo r = list.get(i);
					%>
					<tr class="row1">
						<td align="center"><%=r.getRid()%></td>
						<td align="center"><%=r.getRoomId()%></td>
						<td align="center"><%=r.getRoomArea()%></td>
						<td align="center"><%=r.getBedNum()%></td>
						<td align="center"><%=r.getRoomPrice()%></td>
						<td align="center"><%=r.getRoomType()%></td>
						<td align="center"><%=r.getRoomLevel()%></td>
						<td align="center"><%=r.getToilet()%></td>
						<td align="center"><%=r.getAirConditioner()%></td>
						<td align="center"><%=r.getTV()%></td>
						<td align="center"><%=r.getTelephone()%></td>
						<td align="center"><%=r.getRoomStatus()%></td>
						<td align="center"><%=r.getComments()%></td>
						<td align="center">
						       <a href="InsertOrderServlet?roomId=<%=r.getRoomId()%>">预定</a>&nbsp;&nbsp;
						</td>
					</tr>
					<%
						}
					%>
				</table>
			    
			</div>
		</div>
		<div id="footer">
			<div id="footer_bg">在线预约@126.com</div>
		</div>
	</div>
</body>
</html>